import request from "@/utils/request";
// 近期研学列表
export const getRecentList = (data) => {
  return request.get("/project/recentProjectList", data);
};
// 研学详情
export const getProjectDetail = (data) => {
  return request.post("/project/projectInfo", data);
};
// 研学报名
export const projectApply = (data) => {
  return request.post("/project/projectApply", data);
};
// 人气研学列表
export const getHotList = (data) => {
  return request.post("/project/popularityProjectList", data);
};
// 研学规格参数列表（日期、人数）
const getProjectSpec = (data) => {
  return request.get("/institution/getProjectSpec", data);
};

// 研学列表
const getProjectList = () => {
  return request.get("/institution/getProjectList");
};

// 发起研学
const releaseProject = (data) => {
  return request.post("/institution/releaseProject", data);
};

// 我的研学列表 (机构)
const getgoodsList = (data) => {
  return request.post("/institution/goodsList", data);
};

// 研学项目详情（进行中）
const getProjectingInfo = (data) => {
  return request.get("/institution/getProjectingInfo", data);
};

//项目风采列表(相册）
const getalbumList = (data) => {
  return request.post("/institution/albumList", data);
};

//新增项目风采列表(相册）
const setalbumEdit = (data) => {
  return request.post("/institution/albumEdit", data);
};

//项目风采素材上传
const imgSubmit = (data) => {
  return request.post("/institution/imgSubmit", data);
};

//项目风采素材获取
const albumImgList = (data) => {
  return request.post("/institution/albumImgList", data);
};

//往期研学项目详情
const getProjectedInfo = (data) => {
  return request.get("/institution/getProjectedInfo", data);
};

// 一键绑定
const projectBinding = (data) => {
  return request.post("/institution/projectBinding", data);
};

// 绑定信息id
const getBindingInfo = (data) => {
  return request.get("/institution/getBindingInfo", data);
};

// 研学项目绑定信息列表
const getBindingInfoList = (data) => {
  return request.get("/contract/getBindingInfoList", data);
};

// 绑定信息修改
const bindingInfoEdit = (data) => {
  return request.post("/institution/bindingInfoEdit", data);
};

// 合同列表
const contractList = (data) => {
  return request.post("/contract/contractList", data);
};
// 生成研学邀请函
export const getProjectInviteInfo = (data) => {
  return request.get("/project/getProjectInviteInfo", data);
};
export default {
  getRecentList,
  getProjectDetail,
  projectApply,
  getHotList,
  getProjectSpec,
  getProjectList,
  releaseProject,
  getgoodsList,
  getProjectingInfo,
  getalbumList,
  setalbumEdit,
  imgSubmit,
  albumImgList,
  getProjectedInfo,
  projectBinding,
  getBindingInfo,
  getBindingInfoList,
  bindingInfoEdit,
  contractList,
  getProjectInviteInfo,
};
